import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('sys_dict_data', { schema: 'lvlu' })
export class SysDictData {
  @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
  id: number;

  @Column('varchar', {
    name: 'label',
    nullable: true,
    comment: '字典数据名称',
    length: 50,
  })
  label: string | null;

  @Column('varchar', {
    name: 'value',
    nullable: true,
    comment: '字典数据值',
    length: 50,
  })
  value: string | null;

  @Column('varchar', {
    name: 'dict_type',
    nullable: true,
    comment: '字典类型',
    length: 50,
  })
  dictType: string | null;

  @Column('varchar', {
    name: 'list_class',
    nullable: true,
    comment: '表格内样式',
    length: 50,
  })
  listClass: string | null;

  @Column('int', { name: 'sort', nullable: true, comment: '排序' })
  sort: number | null;

  @Column('char', {
    name: 'status',
    nullable: true,
    comment: '状态 0:禁用 1:启用',
    length: 1,
  })
  status: string | null;

  @Column('varchar', {
    name: 'remark',
    nullable: true,
    comment: '备注',
    length: 100,
  })
  remark: string | null;

  @Column('varchar', {
    name: 'create_user',
    nullable: true,
    comment: '创建人',
    length: 50,
  })
  createUser: string | null;

  @Column('datetime', {
    name: 'craete_time',
    nullable: true,
    comment: '创建时间',
  })
  craeteTime: Date | null;

  @Column('varchar', {
    name: 'update_user',
    nullable: true,
    comment: '更新人',
    length: 50,
  })
  updateUser: string | null;

  @Column('datetime', {
    name: 'update_time',
    nullable: true,
    comment: '更新时间',
  })
  updateTime: Date | null;
}
